# Contributor: Ed Robinson <edward-robinson@cookpad.com>
# Maintainer: Ed Robinson <edward-robinson@cookpad.com>
pkgname=dep
pkgver=0.5.4
pkgrel=2
pkgdesc="Go dependency management tool"
url="https://github.com/golang/dep"
arch="all !mips !mips64"
license="BSD-3-Clause"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/golang/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

builddir="$srcdir/src/github.com/golang/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	default_prepare
}

build() {
	export GOPATH="$srcdir"
	cd "$builddir"
	go build -ldflags="-X main.version=$pkgver" -o ./bin/dep ./cmd/dep
}

package() {
	cd "$builddir"
	install -Dm755 ./bin/dep "$pkgdir"/usr/bin/dep
}

check() {
	cd "$builddir"
	./bin/dep status > /dev/null
}

sha512sums="b7657447c13a34d44bce47a0e0e4a3e7471efd7dffbbc18366d941302c561995ef1f2b58f92a46ed7e3d86322627964637772aab5216d334ad53fba94c1e241b  dep-0.5.4.tar.gz"
